import h from "./mysnabbdom/h.js";
import patch from "./mysnabbdom/patch.js";

const myVnode = h('ul',{},[
    h('li',{key:'A'},'A'),
    h('li',{key:'B'},'B'),
    h('li',{key:'C'},'C'),
    h('li',{key:'D'},'D'),
    h('li',{key:'F'},'F'),

])
const myVnode2 = h('ul',{},[
    h('li',{key:'C'},'C'),
    h('li',{key:'D'},'D'),
    h('li',{key:'A'},'A'),
    h('li',{key:'F'},'F'),
])
const container = document.getElementById('container');
const btn = document.getElementById('btn')
patch(container,myVnode);
btn.onclick = function(){
    patch(myVnode,myVnode2);
}